package com.chatdating.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/*
* 帖子实体类
 */
@Data
@TableName("posts")
public class Post {
    @TableId(type = IdType.AUTO)
    private Long id;

    private String content;//帖子内容
    private Integer authorId; // 发帖用户ID
    private String authorName;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;//创建时间

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;//修改时间

    @TableField(exist = false)
    private List<Comment> comments;//帖子评论

    @TableField(exist = false)
    private Integer commentCount; // 评论数

    @TableField(exist = false)
    private Integer likeCount; // 点赞数

    private String imageUrls;//图片地址

    @TableLogic
    private Integer deleted; // 逻辑删除标志 (0:未删除, 1:已删除)


    private String userHead; // 用户头像

}
